﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Enterprise.Model.Entities;
using Enterprise.Model.IRepositories;

namespace Enterprise.Model.Domains
{
    public class RegrasDeTarefa 
    {
        IRepositorioDeTarefa repositorioTarefa;

        //injecao de Depencia
        public RegrasDeTarefa(IRepositorioDeTarefa repositorioTarefa) 
        {
            this.repositorioTarefa = repositorioTarefa;
        }

        public void Incluir(Tarefa tarefa) 
        {

            this.repositorioTarefa.Adicionar(tarefa);
  
        }

        public void Excluir(Tarefa tarefa) 
        {
            this.repositorioTarefa.Apagar(tarefa.TarefaID);
        }

        public void Alterar(Tarefa tarefa) 
        {
            this.repositorioTarefa.Atualizar(tarefa);
        }

    }
}
